/***************************************************************************
 *   Copyright (C) 2008 by Goliash   *
 *   goliash@goliash.net   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#include <QtGui>
/*
class MySqlTableModel : public QSqlQueryModel
{
public:
	QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const 
	{
		if (!index.isValid())
			return QVariant();
		
		if(index.column() == 3)
			return index.data(Qt::DisplayRole);

		if (role == Qt::DisplayRole) {
			return index.data(Qt::DisplayRole);

		return QVariant();
	}
};
*/
// #include "mysqltablemodel.h"

class ItemDelegate : public QItemDelegate
{
public:
	ItemDelegate() : QItemDelegate() {};
	//void drawDecoration ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QPixmap & pixmap ) const;

	void drawDecoration ( QPainter * painter, const QStyleOptionViewItem & option, const QRect & rect, const QPixmap & pixmap ) const 
	{
			QPixmap pix(22, 22);
			pix.fill(Qt::red);
			QItemDelegate::drawDecoration(painter, option, option.rect, pix);
    }
};

